import java.util.Scanner;
import java.util.Calendar;
import java.util.GregorianCalendar;

public class CalendarSample {
  public static void main(String[] args) {
  Scanner input = new Scanner(System.in);

  System.out.print("Enter a month in the year (e.g., 1 for Jan) :");
  int month = input.nextInt() - 1;


  System.out.print("Enter a year :");
  int year = input.nextInt();

  Calendar cal = new GregorianCalendar(year, month, 1);

  int days = cal.getActualMaximum(Calendar.DAY_OF_MONTH);

  System.out.print(month+"/"+year+" has "+days+" days");
  }
}